#pragma once
#include "rendertech.h"
class CRenderAssistLineShell :
	public RenderTech
{
public:
	CRenderAssistLineShell(void);
	virtual ~CRenderAssistLineShell(void);

	virtual HRESULT OnD3D11CreateDevice( ID3D11Device* pd3dDevice, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc, CDirectoryUtil* pDirUtil, void* pUserContext);
	virtual HRESULT OnD3D11ResizedSwapChain( ID3D11Device* pd3dDevice, IDXGISwapChain* pSwapChain, const DXGI_SURFACE_DESC* pBackBufferSurfaceDesc, CDirectoryUtil* pDirUtil, void* pUserContext );
	virtual void OnD3D11ReleasingSwapChain( void* pUserContext );
	virtual void OnD3D11DestroyDevice( void* pUserContext );
	virtual void OnD3D11FrameRender( ID3D11Device* pd3dDevice, ID3D11DeviceContext* pd3dImmediateContext, CBaseCamera* pViewCamera, CDirectoryUtil* pDirUtil, double fTime,
		float fElapsedTime, void* pUserContext );
	virtual void InitEffectsVariables();
	virtual void ReloadEffectsDebug(ID3D11Device* pd3dDevice, CDirectoryUtil* pDirUtil);
private:
	void CreateEmphasizeLine(int iSegment, float thetaMin, float thetaMax, float phiMin, float phiMax, float radius1, float radius2,
		CGrowableArray<PT_VertColor>& ptsArray, D3DXVECTOR4 fColor);
	void CreateAxisLine(float length, CGrowableArray<PT_VertColor>& ptsArray);
	void CreateIntersectionLines(float radius, int iNewSegment, float thetaMin, float thetaMax, float phiMin, float phiMax, CGrowableArray<PT_VertColor>& ptsArray, D3DXVECTOR4 fColor);
	void CreatePartialSphereLineSegs(float radius, int iSegment, float thetaMin, float thetaMax, float phiMin, float phiMax, CGrowableArray<PT_VertColor>& ptsArray, D3DXVECTOR4 fColor);

public:
    ID3D11Buffer* m_pAssistLineVB;
	ID3D11InputLayout* m_pAssistLineVBLayout;
	int m_iNumAssistVertices;

	ID3DX11EffectTechnique* m_pRenderTech;
	ID3DX11EffectMatrixVariable* m_pWorldViewProjMat;
};

